﻿using B.S.AuthCenter.Api.Read.Application.Command.Approval;
using B.S.AuthCenter.Api.Read.DTOs.Approval;
using B.S.AuthCenter.Common;
using B.S.AuthCenter.ErrorCount;
using MediatR;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace B.S.AuthCenter.Api.Read.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    [Authorize]
    public class ApprovalController : ControllerBase
    {
        IMediator mediator;

        public ApprovalController(IMediator mediator)
        {
            this.mediator = mediator;
        }
        [HttpGet]
        public Task<ApiPaging<ApprovalDTO>> ShowApp([FromQuery]GetAppFormCommand request)
        {
            return mediator.Send(request);
        }
        [HttpGet]
        public Task<ApiResult<ScheduleDTO>> ShowSche([FromQuery]GetScheduleCommand request)
        {
            string s = "123";
            int num = s.Toint32();
            
            return mediator.Send(request);
        }
       
    }
}
